#ifndef LOGISTICS_H
#define LOGISTICS_H
#include "tools.h"

#define GOODS_MAX 1000
#define LOSS_GOODS_MAX 1000
#define GOODS_NEED 10

typedef struct Goods
{
	char id[11];
	char name[20];
	double price;
	unsigned int nums;
}Goods;

typedef struct Loss_Goods
{
	char id[10];
	char name[20];
	char reason[31];
	double price;
	unsigned int nums;
}Loss_Goods;

extern Goods goods[GOODS_MAX];
extern Loss_Goods loss_goods[LOSS_GOODS_MAX];
extern size_t g_goods_cnt;
extern size_t g_loss_goods_cnt;

bool login_logistics(void);

int query_goods_id(const char* id);

double get_price(void);

void add_goods(void);

// 下架一种商品
void ban_goods(void);

void add_goods_nums(void);

void update_goods(void);

void find_goods(void);

// 需要补货的商品
void need_goods(void);

// 报损
void add_loss_goods(void);
void show_loss_goods(void);
void menu_goods(void);

#endif//LOGISTICS_H
